# -*- coding:utf-8 -*-
#!/usr/bin/python3

import datetime

def getday(y=2017,m=8,d=15,n=0):
    '''
        print(getday(2017,8,15,21)) #8月15日后21天
        print(getday(2017,9,1,-10)) #9月1日前10天
    '''
    the_date = datetime.datetime(y,m,d)
    result_date = the_date + datetime.timedelta(days=n)
    d = result_date.strftime('%Y-%m-%d')
    return d
